﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Linq;

using VideoPlay.Services.Models;

namespace VideoPlay.Adapters
{
    public class LocalDataBaseContext:DataContext,IDisposable
    {
        public LocalDataBaseContext(string connectionString)
            : base(connectionString)
        {
            if (!this.DatabaseExists())
            {
                this.CreateDatabase();
            }
        }

        public Table<List> Lists
        {
            get
            {
                return this.GetTable<List>();
            }
        }
    }
}
